import {memo} from "react";

const SlowList = memo(function SList({value}){
    const item = [];
    for(let i=0; i<250; i++){
        item.push(<Item key={i} item={value}/>);
    }
    return(
        <ul>
            {item}
        </ul>
    )
})

function Item ({item}){
    const startTimer = performance.now();
    while(performance.now() - startTimer < 1){
        //do nothing
    }
    return <li>TEXT：{item}</li>
}

export default SlowList;